* <http://www.gnu.org/licenses/>.
*/
+#ifdef _WIN32
+#include <shlobj.h>
+#endif
+
#include <time.h>
#include <sys/stat.h>
#include "config.h"
if (getenv ("HOME"))
sprintf (path, "%s/.cache/babl/babl-fishes", getenv("HOME"));
#else
- if (getenv ("TEMP"))
+{
+ char win32path[4096];
+ if (SHGetFolderPathA (NULL, CSIDL_LOCAL_APPDATA, NULL, SHGFP_TYPE_CURRENT, win32path) == S_OK)
+ sprintf (path, "%s\\%s\\babl-fishes.txt", win32path, BABL_LIBRARY);
+ else if (getenv ("TEMP"))
sprintf (path, "%s\\babl-fishes.txt", getenv("TEMP"));
+}
#endif
if (stat (path, &stat_buf)==0 && S_ISREG(stat_buf.st_mode))